﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Linq;
using System.Xml;
using Aulac.Global.Enums; 
using Aulac.Global.Data; 
using Aulac.Global.Common; 
using Aulac.Global.Xml;
using Aulac.Rsc.Ems; 
using Aulac.Rsc.Ems.Tags;
using Aulac.Client.Data.Helper;
using Aulac.Verb.Ems;
using Aulac.Global.AccessRight;
using Aulac.Rsc;

namespace Aulac.Client.Bss.InOutPut
{
    public partial class FormRecMdnStore : Aulac.Client.Controls.Forms.Ems.FormEmsDataVchBase
    {
        public FormRecMdnStore()
        {
            InitializeComponent();            
            Init();
            SetFieldMember();
        }

        #region Listents
        private void txtTaxRate_TextChanged(object sender, EventArgs e)
        {
            grdLine.TaxRate = txtTaxRateH.Double;
            grdLine.CalcAllRowsAmtItemLine(tagVch.Inv.TaxRate);
            grdLine.SetTotalSummary();
        }

        private void cbTagStoreType_ValueControlChanged(object sender, EventArgs e)
        {
            //cbRscFnc.Enabled = true;
            switch (cbTagStoreType.TagStoreTypeID)
            {
                case TagStoreTypes.None:
                    break;
                case TagStoreTypes.InputBuy:
                    cbStore.SetStoreTypes(StoreTypes.Buseniss, StoreTypes.Program, StoreTypes.Other, StoreTypes.Manager);
                    break;
                case TagStoreTypes.InputRepair:
                    cbStore.SetStoreTypes();
                    //cbRscFnc.RscFncPrkID = "";
                    //cbRscFnc.Enabled = false;
                    break;
                case TagStoreTypes.InputOther:
                    break;
                case TagStoreTypes.InputOfProgram:
                    cbStore.SetStoreTypes(StoreTypes.Program);
                    break;
                case TagStoreTypes.InputOfClinic:
                    cbStore.SetStoreTypes(StoreTypes.Clinic);
                    break;
                default:
                    break;
            }
        }

        #endregion

        private void tabControlBase_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (tabControlBase.SelectedTab == tabPgList)
                InitGrd();
        }
    }
}
